﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using MVVMFramework.Core.Model;
using System.ServiceModel.DomainServices.Client;

namespace MVVMFramework.Ria.Helpers
{
    public static class LoadBehaviorExtensions
    {
        public static ModelLoadBehavior AsModelLoadBehavior(this LoadBehavior lb)
        {
            switch (lb)
            {
                case LoadBehavior.KeepCurrent: return ModelLoadBehavior.KeepCurrent;
                case LoadBehavior.MergeIntoCurrent: return ModelLoadBehavior.MergeIntoCurrent;
                case LoadBehavior.RefreshCurrent: return ModelLoadBehavior.RefreshCurrent;
                default: return ModelLoadBehavior.KeepCurrent;
            }
        }
    }
}
